﻿(function () {
	var callbackId = 10000000001;
	window.callback_pool = [];
	var CommonUtil = function () { };

	var error = function () {
		alert('plugin error');
	}

	CommonUtil.prototype.showChildWebView = function (value, callback) {
		location.href = "showChildWebView://" + value;
	}

	CommonUtil.prototype.hideChildWebView = function () {
		location.href = "close://";
	}

	CommonUtil.prototype.showMainWebView = function(value){
		location.href = "showmainwebview://" + value

	}

	CommonUtil.prototype.openCapture = function(callback){
		callback_pool[++callbackId] = callback;
		location.href = "opencapture://index?{callbackId=" + callbackId + "}";
	}

	CommonUtil.prototype.openPhotoGallery = function(callback){
		callback_pool[++callbackId] = callback;
		location.href = "openphotogallery://index?{callbackId=" + callbackId + "}";
	}
	window.CommonUtil = new CommonUtil();
})()